| Fully Qualified Name: | CodeIgniter\Test\TestLogger |
| Extends: | Logger |
| Name | Description | Defined By |
|---|---|---|
| __construct() | Constructor. | Logger |
| alert() | Action must be taken immediately. | Logger |
| cleanup() | TestLogger | |
| critical() | Critical conditions. | Logger |
| debug() | Detailed debug information. | Logger |
| determineFile() | Determines the file and line that the logging call was made from by analyzing the backtrace. | Logger |
| didLog() | Used by CIUnitTestCase class to provide ->assertLogged() methods. | TestLogger |
| emergency() | System is unusable. | Logger |
| error() | Runtime errors that do not require immediate action but should typically be logged and monitored. | Logger |
| info() | Interesting events. | Logger |
| log() | The log method is overridden so that we can store log history during the tests to allow us to check ->assertLogged() methods. | TestLogger |
| notice() | Normal but significant events. | Logger |
| warning() | Exceptional occurrences that are not errors. | Logger |
Constructor.
| Parameter Name | Type | Description |
|---|---|---|
| $config | \Config\Logger | |
| $debug | bool |
Returns:
Action must be taken immediately.
Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.
| Parameter Name | Type | Description |
|---|---|---|
| $message | string | |
| $context | array |
Returns: bool
| Parameter Name | Type | Description |
|---|---|---|
| $file |
Returns: void
Critical conditions.
Example: Application component unavailable, unexpected exception.
| Parameter Name | Type | Description |
|---|---|---|
| $message | string | |
| $context | array |
Returns: bool
Detailed debug information.
| Parameter Name | Type | Description |
|---|---|---|
| $message | string | |
| $context | array |
Returns: bool
Determines the file and line that the logging call was made from by analyzing the backtrace.
Find the earliest stack frame that is part of our logging system.
Returns: array
Used by CIUnitTestCase class to provide ->assertLogged() methods.
| Parameter Name | Type | Description |
|---|---|---|
| $level | string | |
| $message | string |
Returns: bool
System is unusable.
| Parameter Name | Type | Description |
|---|---|---|
| $message | string | |
| $context | array |
Returns: bool
Runtime errors that do not require immediate action but should typically be logged and monitored.
| Parameter Name | Type | Description |
|---|---|---|
| $message | string | |
| $context | array |
Returns: bool
Interesting events.
Example: User logs in, SQL logs.
| Parameter Name | Type | Description |
|---|---|---|
| $message | string | |
| $context | array |
Returns: bool
The log method is overridden so that we can store log history during the tests to allow us to check ->assertLogged() methods.
| Parameter Name | Type | Description |
|---|---|---|
| $level | string | |
| $message | string | |
| $context | array |
Returns: bool
Normal but significant events.
| Parameter Name | Type | Description |
|---|---|---|
| $message | string | |
| $context | array |
Returns: bool
Exceptional occurrences that are not errors.
Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.
| Parameter Name | Type | Description |
|---|---|---|
| $message | string | |
| $context | array |
Returns: bool